<?php
/**
 * [收藏与商品关联的视图模型]
 * @Author: mazhenyu[houdunwangmzy@163.com]
 * @Date:   2014-09-19 17:48:15
 * @Last Modified by:   mazhenyu
 * @Last Modified time: 2014-09-22 15:56:29
 */
 	
class StoreGoodsViewModel extends ViewModel{
	 public $table = 'goods_store';

	 public $view =array(
	 		'goods_store' => array(
	 			'_type' => 'INNER'
	 			),
			'goods' => array(
				 '_on'  => '__goods_store__.gid=__goods__.gid',
				 '_type' => 'INNER'
			)
        );


	 public function get_data($where=NULL){
	 	return $this->where($where)->all();

	 }

	 public function get_one_data($where=NULL){
	 	return $this->where($where)->find();

	 }
}